import java.util.Scanner;

public class code3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] a = new int[n+1][n+1];
        if (n==1) {
            a[1][1] = 1;
        }
        if (n>=2) {
            a[1][1] = a[2][1] = a[2][2] = 1;
        }
        for (int i = 3; i <=n; i++) {
            for (int j = 1; j <=i; j++) {
                if (j==1||j==i) {
                    a[i][j] = 1;
                } else {
                    a[i][j] = a[i-1][j-1] + a[i-1][j];
                }
            }
        }
        for (int i = 1; i <=n; i++) {
            for (int j = 1; j <=i ; j++) {
                System.out.printf("%5d",a[i][j]);
            }
            System.out.println();
        }
    }
}
